<%@ taglib uri="/WEB-INF/tags/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/tags/weboo.tld" prefix="web"%>
<%@ taglib uri="/WEB-INF/tags/ajax.tld" prefix="ajax"%>

<web:css src="/weboo/css"/>
<web:css src="/adam/css"/>

<web:javascript src="/weboo/js" deep="1"/>
<table border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td>
			<img src='<web:pic src="logo.gif"/>' width="168" height="42" border="0" alt="" style="cursor:pointer"
				onclick="projectList.refresh();"
				ondblclick="projectForm.reset();return false;">
			<div id="projects" style="position:absolute"></div>
		</td>
		<td></td>
	</tr>
</table>
<div id="sky"></div>
<table>
<tr>
	<td id="list"></td>
	<td id="form"></td>
</tr>
</table>
<ajax:root>
	<!--
	Project list
	-->
	<ajax:view name="projectList"  type="weboo.core.list">
		<ajax:gasket>"#projects"</ajax:gasket>
		<ajax:property name="dest_query">"/adam/queryProject"</ajax:property>
		<ajax:function name="click" params="value">projectForm.fetch(value);projectList.hide();</ajax:function>
	</ajax:view>
	<!--
	Project form
	-->
	<ajax:view name="projectForm"  type="weboo.core.form">
		<ajax:pattern>adam.pattern.ProjectDetail</ajax:pattern>
		<ajax:gasket>"#sky"</ajax:gasket>
		<ajax:post>id,name,comment</ajax:post>
		<ajax:getter name="createTime" params="v">if(!v) return "";return v.substring(0,10);</ajax:getter>
		<ajax:getter name="lastModifiedTime" params="v">if(!v) return "";return v.substring(0,10);</ajax:getter>
		<ajax:event type="mousedown" to="save" by="save"/>
		<ajax:property name="dest_save">"/adam/saveProject"</ajax:property>
		<ajax:property name="dest_fetch">"/adam/fetchProject"</ajax:property>
	</ajax:view>
</ajax:root>